#Code for CSD in census
ct <-  "35535"
cm  <-  "24462"
cv  <-  "59933"

#Code for central municipality in census
cmt <-  "3520005"
cmv <- "5915022"
cmm <- "2466023"

#Coordinates of city hall
cht  <-  c(-79.5257363, 43.6148863)
chv  <-  c(-123.2309412, 49.2219987)
chm  <-  c(-73.7171664, 45.4726094)

#Critical distance for AirBnb
bdtv <- 10000
bdm <-  12000

#Files from inside airbnb
f  <-  list.files('insideairbnb/')

## Identifying the vectors for visible Minority status
parent_vector <- "v_CA16_3954"
minorities <- list_census_vectors("CA16") %>% 
  filter(vector == "v_CA16_3954") %>% 
  child_census_vectors(leaves_only = TRUE) %>% 
  pull(vector)

minority_vectors <- c(parent_vector, minorities)
lab  <-  as.data.frame (list_census_vectors('CA16') %>% 
                       filter(vector %in% minorities) %>% 
                       select(vector, label))
montrealAirbnb <- read.csv(paste0('insideairbnb/', f[1]))
torontoAirbnb <- read.csv(paste0('insideairbnb/', f[2]))
vancouverAirbnb <- read.csv(paste0('insideairbnb/', f[3]))

df <-  rbind(montrealAirbnb, torontoAirbnb, vancouverAirbnb)
l <- levels(df$property_type)
lookup  <-  data.frame('type' = 1:length(l))
lookup$type <- as.factor(l)
lookup$property_group <- c(
  # [1] "Aparthotel"             "Apartment"              "Bed and breakfast"      "Boat"                   "Boutique hotel"         "Bungalow"               "Cabin"                 
  'hotel', 'home', 'hotel', 'other', 'hotel', 'home', 'other',
  #  [8] "Camper/RV"              "Campsite"               "Casa particular (Cuba)" "Cave"                   "Chalet"                 "Condominium"            "Cottage"               
  'other', 'other', 'home', 'other', 'home', 'home', 'home',
  # [15] "Farm stay"              "Guest suite"            "Guesthouse"             "Hostel"                 "Hotel"                  "House"                  "Houseboat"             
  'home', 'home', 'hotel', 'hotel', 'hotel', 'home', 'home',
  # [22] "Hut"                    "Loft"                   "Nature lodge"           "Other"                  "Serviced apartment"     "Tent"                   "Timeshare"             
  'other', 'home', 'other', 'other', 'hotel', 'other', 'other',
  # [29] "Tiny house"             "Townhouse"              "Villa"                  "Barn"                   "Castle"                 "Dorm"                   "Earth house"           
  'home', 'home', 'home', 'home', 'home', 'hotel', 'other',
  # [36] "In-law"                 "Parking Space"          "Treehouse"              "Resort"            
  'home', 'other', 'other', 'hotel'
)

df <-  data.frame(df,lookup[match(df$property_type, lookup$type),] )
# dfh = subset(df, property_group == 'home' & as.character(df$host_neighbourhood) == as.character(df$neighbourhood) & df$room_type != "Shared room")
dfh  <-  subset(df, property_group == 'home' & as.character(df$host_neighbourhood) == as.character(df$neighbourhood))
dfh$property_group <- NULL
dfhu  <-  dfh[!duplicated(dfh$host_id),]
dim(dfh)[1] - dim(df)[1]
## [1] -11639
dim(dfhu)[1] - dim(dfh)[1]
## [1] -7168
dfhu$year  <-  as.numeric(substr(dfhu$last_review, 1, 4))
dfhun <-  subset(dfhu, year >= 2017)
dim(dfhun)[1] - dim(dfhu)[1]
## [1] -7499
dfhun$numPrice <- as.numeric(gsub("[$]",'',dfhun$price))
## Warning: NAs introduits lors de la conversion automatique
summary(dfhun$room_type)
## Entire home/apt    Private room     Shared room 
##           12163            4592             150
final  <-  subset(dfhun, room_type != "Shared room")

final$rooms  <-  ifelse(final$bedrooms == 0, 1, final$bedrooms)
final$priceperroom  <-  as.numeric(ifelse(final$room_type == T,  final$numPrice,  final$numPrice / final$rooms))
dim(final) / dim(df)
## [1] 0.3877485 1.0306122

Census data of all Canadians Metros

# Apply function to get EI for all CSD for all Canadian CMAS
cmas <- list_census_regions("CA16") %>% filter(level == "CMA") %>% select(region, name, pop)
## Querying CensusMapper API for regions data...
cma_ei <- purrr::map_df(cmas$region, .f = diversity_csd) %>% 
  left_join(cmas, by = c("CMA"="region")) %>% 
  select(`Region Name`, `CMA Name`=name, CMA, GeoUID, Population, `CMA Population` = pop, Ei)
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 4.5 kB     
Downloading: 4.5 kB     
Downloading: 4.5 kB     
Downloading: 4.5 kB     
Downloading: 4.5 kB     
Downloading: 4.5 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 2.1 kB     
Downloading: 2.1 kB     
Downloading: 2.1 kB     
Downloading: 2.1 kB     
Downloading: 2.1 kB     
Downloading: 2.1 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 880 B     
Downloading: 880 B     
Downloading: 880 B     
Downloading: 880 B     
Downloading: 880 B     
Downloading: 880 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 530 B     
Downloading: 530 B     
Downloading: 530 B     
Downloading: 530 B     
Downloading: 530 B     
Downloading: 530 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 600 B     
Downloading: 600 B     
Downloading: 600 B     
Downloading: 600 B     
Downloading: 600 B     
Downloading: 600 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 930 B     
Downloading: 930 B     
Downloading: 930 B     
Downloading: 930 B     
Downloading: 930 B     
Downloading: 930 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 780 B     
Downloading: 780 B     
Downloading: 780 B     
Downloading: 780 B     
Downloading: 780 B     
Downloading: 780 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B     
Downloading: 860 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 490 B     
Downloading: 490 B     
Downloading: 490 B     
Downloading: 490 B     
Downloading: 490 B     
Downloading: 490 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B     
Downloading: 740 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B     
Downloading: 510 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 500 B     
Downloading: 500 B     
Downloading: 500 B     
Downloading: 500 B     
Downloading: 500 B     
Downloading: 500 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 680 B     
Downloading: 680 B     
Downloading: 680 B     
Downloading: 680 B     
Downloading: 680 B     
Downloading: 680 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 480 B     
Downloading: 480 B     
Downloading: 480 B     
Downloading: 480 B     
Downloading: 480 B     
Downloading: 480 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 870 B     
Downloading: 870 B     
Downloading: 870 B     
Downloading: 870 B     
Downloading: 870 B     
Downloading: 870 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B     
Downloading: 630 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 620 B     
Downloading: 620 B     
Downloading: 620 B     
Downloading: 620 B     
Downloading: 620 B     
Downloading: 620 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 590 B     
Downloading: 590 B     
Downloading: 590 B     
Downloading: 590 B     
Downloading: 590 B     
Downloading: 590 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 730 B     
Downloading: 730 B     
Downloading: 730 B     
Downloading: 730 B     
Downloading: 730 B     
Downloading: 730 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B     
Downloading: 520 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 940 B     
Downloading: 940 B     
Downloading: 940 B     
Downloading: 940 B     
Downloading: 940 B     
Downloading: 940 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 1 kB     
Downloading: 1 kB     
Downloading: 1 kB     
Downloading: 1 kB     
Downloading: 1 kB     
Downloading: 1 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 550 B     
Downloading: 550 B     
Downloading: 550 B     
Downloading: 550 B     
Downloading: 550 B     
Downloading: 550 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 760 B     
Downloading: 760 B     
Downloading: 760 B     
Downloading: 760 B     
Downloading: 760 B     
Downloading: 760 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 580 B     
Downloading: 580 B     
Downloading: 580 B     
Downloading: 580 B     
Downloading: 580 B     
Downloading: 580 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 560 B     
Downloading: 560 B     
Downloading: 560 B     
Downloading: 560 B     
Downloading: 560 B     
Downloading: 560 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 570 B     
Downloading: 570 B     
Downloading: 570 B     
Downloading: 570 B     
Downloading: 570 B     
Downloading: 570 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B     
Downloading: 470 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B     
Downloading: 670 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B     
Downloading: 640 B
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B     
Downloading: 380 B
## Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character
## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector
############# compute segregation for all metros and plot comparison of index

cma_seg <- purrr::map_df(cmas$region, .f = segregation_csd) %>% 
  left_join(cmas, by = c("cma"="region")) %>% 
  select(`Region Name`=name.x, `CMA Name`=name.y, CMA = cma,Population = csdpop, `CMA Population` = pop, Ei = csdei, H) %>% 
  ungroup()
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 370 kB     
Downloading: 370 kB     
Downloading: 390 kB     
Downloading: 390 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 31 kB     
Downloading: 31 kB     
Downloading: 31 kB     
Downloading: 31 kB     
Downloading: 31 kB     
Downloading: 31 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 370 kB     
Downloading: 370 kB     
Downloading: 370 kB     
Downloading: 370 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 390 kB     
Downloading: 390 kB     
Downloading: 390 kB     
Downloading: 390 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 420 kB     
Downloading: 430 kB     
Downloading: 430 kB     
Downloading: 430 kB     
Downloading: 430 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 440 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 460 kB     
Downloading: 460 kB     
Downloading: 460 kB     
Downloading: 460 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 480 kB     
Downloading: 480 kB     
Downloading: 480 kB     
Downloading: 480 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 490 kB     
Downloading: 500 kB     
Downloading: 500 kB     
Downloading: 500 kB     
Downloading: 500 kB     
Downloading: 500 kB     
Downloading: 500 kB     
Downloading: 510 kB     
Downloading: 510 kB     
Downloading: 510 kB     
Downloading: 510 kB     
Downloading: 510 kB     
Downloading: 510 kB     
Downloading: 520 kB     
Downloading: 520 kB     
Downloading: 520 kB     
Downloading: 520 kB     
Downloading: 520 kB     
Downloading: 520 kB     
Downloading: 520 kB     
Downloading: 520 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 17 kB     
Downloading: 17 kB     
Downloading: 17 kB     
Downloading: 17 kB     
Downloading: 17 kB     
Downloading: 17 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 9.2 kB     
Downloading: 9.2 kB     
Downloading: 9.2 kB     
Downloading: 9.2 kB     
Downloading: 9.2 kB     
Downloading: 9.2 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 9.5 kB     
Downloading: 9.5 kB     
Downloading: 9.5 kB     
Downloading: 9.5 kB     
Downloading: 9.5 kB     
Downloading: 9.5 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 9.4 kB     
Downloading: 9.4 kB     
Downloading: 9.4 kB     
Downloading: 9.4 kB     
Downloading: 9.4 kB     
Downloading: 9.4 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 5.7 kB     
Downloading: 5.7 kB     
Downloading: 5.7 kB     
Downloading: 5.7 kB     
Downloading: 5.7 kB     
Downloading: 5.7 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 48 kB     
Downloading: 48 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 60 kB     
Downloading: 60 kB     
Downloading: 64 kB     
Downloading: 64 kB     
Downloading: 68 kB     
Downloading: 68 kB     
Downloading: 72 kB     
Downloading: 72 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 85 kB     
Downloading: 85 kB     
Downloading: 89 kB     
Downloading: 89 kB     
Downloading: 93 kB     
Downloading: 93 kB     
Downloading: 97 kB     
Downloading: 97 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 6.1 kB     
Downloading: 6.1 kB     
Downloading: 6.1 kB     
Downloading: 6.1 kB     
Downloading: 6.1 kB     
Downloading: 6.1 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 48 kB     
Downloading: 48 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 60 kB     
Downloading: 60 kB     
Downloading: 64 kB     
Downloading: 64 kB     
Downloading: 68 kB     
Downloading: 68 kB     
Downloading: 72 kB     
Downloading: 72 kB     
Downloading: 73 kB     
Downloading: 73 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 85 kB     
Downloading: 85 kB     
Downloading: 88 kB     
Downloading: 88 kB     
Downloading: 88 kB     
Downloading: 88 kB     
Downloading: 88 kB     
Downloading: 88 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 6.4 kB     
Downloading: 6.4 kB     
Downloading: 6.4 kB     
Downloading: 6.4 kB     
Downloading: 6.4 kB     
Downloading: 6.4 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 4.1 kB     
Downloading: 4.1 kB     
Downloading: 4.1 kB     
Downloading: 4.1 kB     
Downloading: 4.1 kB     
Downloading: 4.1 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 55 kB     
Downloading: 55 kB     
Downloading: 55 kB     
Downloading: 55 kB     
Downloading: 55 kB     
Downloading: 55 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 4 kB     
Downloading: 4 kB     
Downloading: 4 kB     
Downloading: 4 kB     
Downloading: 4 kB     
Downloading: 4 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 60 kB     
Downloading: 60 kB     
Downloading: 64 kB     
Downloading: 64 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 64 kB     
Downloading: 64 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 48 kB     
Downloading: 48 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 60 kB     
Downloading: 60 kB     
Downloading: 64 kB     
Downloading: 64 kB     
Downloading: 68 kB     
Downloading: 68 kB     
Downloading: 72 kB     
Downloading: 72 kB     
Downloading: 73 kB     
Downloading: 73 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 85 kB     
Downloading: 85 kB     
Downloading: 89 kB     
Downloading: 89 kB     
Downloading: 93 kB     
Downloading: 93 kB     
Downloading: 97 kB     
Downloading: 97 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB     
Downloading: 3.1 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 82 kB     
Downloading: 82 kB     
Downloading: 82 kB     
Downloading: 82 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 2.8 kB     
Downloading: 2.8 kB     
Downloading: 2.8 kB     
Downloading: 2.8 kB     
Downloading: 2.8 kB     
Downloading: 2.8 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 2.4 kB     
Downloading: 2.4 kB     
Downloading: 2.4 kB     
Downloading: 2.4 kB     
Downloading: 2.4 kB     
Downloading: 2.4 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 2.2 kB     
Downloading: 2.2 kB     
Downloading: 2.2 kB     
Downloading: 2.2 kB     
Downloading: 2.2 kB     
Downloading: 2.2 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.9 kB     
Downloading: 1.9 kB     
Downloading: 1.9 kB     
Downloading: 1.9 kB     
Downloading: 1.9 kB     
Downloading: 1.9 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 33 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 66 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 76 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB
## Querying CensusMapper API...
## 
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB
## Querying CensusMapper API...
## 
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 38 kB     
Downloading: 38 kB     
Downloading: 38 kB     
Downloading: 38 kB     
Downloading: 38 kB     
Downloading: 38 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 24 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 84 kB     
Downloading: 84 kB     
Downloading: 84 kB     
Downloading: 84 kB     
Downloading: 84 kB     
Downloading: 84 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB     
Downloading: 1.6 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 41 kB     
Downloading: 41 kB     
Downloading: 41 kB     
Downloading: 41 kB     
Downloading: 41 kB     
Downloading: 41 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.5 kB     
Downloading: 1.5 kB     
Downloading: 1.5 kB     
Downloading: 1.5 kB     
Downloading: 1.5 kB     
Downloading: 1.5 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 13 kB     
Downloading: 13 kB     
Downloading: 13 kB     
Downloading: 13 kB     
Downloading: 13 kB     
Downloading: 13 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 30 kB     
Downloading: 30 kB     
Downloading: 30 kB     
Downloading: 30 kB     
Downloading: 30 kB     
Downloading: 30 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 21 kB     
Downloading: 21 kB     
Downloading: 21 kB     
Downloading: 21 kB     
Downloading: 21 kB     
Downloading: 21 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB     
Downloading: 1.8 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 48 kB     
Downloading: 48 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 60 kB     
Downloading: 60 kB     
Downloading: 64 kB     
Downloading: 64 kB     
Downloading: 68 kB     
Downloading: 68 kB     
Downloading: 72 kB     
Downloading: 72 kB     
Downloading: 73 kB     
Downloading: 73 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 93 kB     
Downloading: 93 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 25 kB     
Downloading: 25 kB     
Downloading: 25 kB     
Downloading: 25 kB     
Downloading: 25 kB     
Downloading: 25 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 69 kB     
Downloading: 69 kB     
Downloading: 69 kB     
Downloading: 69 kB     
Downloading: 74 kB     
Downloading: 74 kB     
Downloading: 74 kB     
Downloading: 74 kB     
Downloading: 74 kB     
Downloading: 74 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 27 kB     
Downloading: 27 kB     
Downloading: 27 kB     
Downloading: 27 kB     
Downloading: 27 kB     
Downloading: 27 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 37 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB     
Downloading: 1.4 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 35 kB     
Downloading: 35 kB     
Downloading: 35 kB     
Downloading: 35 kB     
Downloading: 35 kB     
Downloading: 35 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB     
Downloading: 1.3 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 45 kB     
Downloading: 45 kB     
Downloading: 45 kB     
Downloading: 45 kB     
Downloading: 45 kB     
Downloading: 45 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB     
Downloading: 1.7 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB     
Downloading: 34 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB
## Querying CensusMapper API...
## 
Downloading: 9.3 kB     
Downloading: 9.3 kB     
Downloading: 9.3 kB     
Downloading: 9.3 kB     
Downloading: 9.3 kB     
Downloading: 9.3 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB
## Querying CensusMapper API...
## 
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB
## Querying CensusMapper API...
## 
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 15 kB     
Downloading: 15 kB     
Downloading: 15 kB     
Downloading: 15 kB     
Downloading: 15 kB     
Downloading: 15 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB     
Downloading: 1.2 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 48 kB     
Downloading: 48 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB     
Downloading: 53 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B     
Downloading: 970 B
## Querying CensusMapper API...
## 
Downloading: 11 kB     
Downloading: 11 kB     
Downloading: 11 kB     
Downloading: 11 kB     
Downloading: 11 kB     
Downloading: 11 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 960 B     
Downloading: 960 B     
Downloading: 960 B     
Downloading: 960 B     
Downloading: 960 B     
Downloading: 960 B
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 26 kB     
Downloading: 26 kB     
Downloading: 26 kB     
Downloading: 26 kB     
Downloading: 26 kB     
Downloading: 26 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 22 kB     
Downloading: 22 kB     
Downloading: 22 kB     
Downloading: 22 kB     
Downloading: 22 kB     
Downloading: 22 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB     
Downloading: 1.1 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 23 kB     
Downloading: 23 kB     
Downloading: 23 kB     
Downloading: 23 kB     
Downloading: 23 kB     
Downloading: 23 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B     
Downloading: 790 B
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.2 kB     
Downloading: 7.2 kB     
Downloading: 7.2 kB     
Downloading: 7.2 kB     
Downloading: 7.2 kB     
Downloading: 7.2 kB
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Warning in bind_rows_(x, .id): Unequal factor levels: coercing to character
## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector

## Warning in bind_rows_(x, .id): binding character and factor vector,
## coercing into character vector
## Adding missing grouping variables: `CSD_UID`
ggplot(bind_rows(cma_seg %>% 
                   filter(Population > 100000) %>% 
                   clean_names2 %>% 
                   top_n(10, -H), 
                 cma_seg %>% 
                   filter(Population > 100000) %>% 
                   clean_names2 %>% 
                   top_n(10, H)), 
       aes(y = H, x = reorder(`Region Name`, H), size = Population)) + 
  #geom_bar(stat = "identity") +
  geom_point(colour = "#7e008c") + 
  coord_flip() + 
  theme_ipsum() +
  theme(panel.grid.major.x = element_blank(),
        panel.grid.minor.x = element_blank(),
        panel.grid.major.y = element_line(linetype = "dotted"),
        legend.position = "none") +
  labs(y = "Segregation entropy index", x = "", 
       #title = "The most and the least segregated large cities in Canada",
       caption = "Segregation index of visible minorities\n@dshkol | Data: Statistics Canada, Census 2016")

ggplot(cma_seg%>% filter(Population > 100000) %>% clean_names2 %>% 
         mutate(big_cma = ifelse(`CMA Population` > 1000000, `CMA Name`,"Other")),
       aes(y= H, x = Ei, size = Population^1.5, colour = big_cma)) +
  #geom_label_repel(aes(label = `Region Name`)) +
  geom_text_repel(aes(label = `Region Name`)) +
  scale_size_continuous(guide = FALSE) + 
  scale_colour_ipsum("", guide = FALSE) +
  theme_ipsum() +
  theme(panel.grid = element_blank(),
        axis.text = element_blank()) + 
  labs(x = "More diverse \u2192", y = "More segregated \u2192",
       caption = "Entropy index based calculations of diversity and segregation\nof visible minority groups in cities with population over 100,000\n@dshkol | Data: Statistics Canada, Census 2016")

Start city specific analysis

city <-  "toronto"


if(city == "toronto"){
  citynames  <-  unique(torontoAirbnb$city)
  censuscode  <-  ct
  cityhall  <-  cht
  censusCodeMuni  <- cmt 
  breakDist <-  bdtv
}
if(city == "vancouver"){
  citynames  <-  unique(vancouverAirbnb$city)
  censuscode  <-  cv
  cityhall  <-  chv
  censusCodeMuni  <-  cmv 
  breakDist  <-  bdtv
}
if(city == "montreal"){
  citynames  <-  unique(montrealAirbnb$city)
  censuscode  <-  cm
  cityhall  <-  chm
  censusCodeMuni <-  cmm
  breakDist  <-  bdm
}

city_data <-  subset(final, city %in% citynames)
cma.ct <- get_census("CA16", regions=list(CMA=censuscode), 
                     vectors = minority_vectors, level = "CT",
                     labels = "short", geo_format = NA)
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
cma.csd <- get_census("CA16", regions=list(CMA=censuscode), 
                      vectors = minority_vectors, level = "CSD",
                      labels = "short", geo_format = NA)
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Reading vectors data from local cache.
csd.geo <- get_census_geometry("CA16", regions=list(CSD=censuscode), 
                               level = "CT", geo_format = "sf")
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.6 kB     
Downloading: 7.6 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 24 kB     
Downloading: 24 kB     
Downloading: 28 kB     
Downloading: 28 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 36 kB     
Downloading: 36 kB     
Downloading: 37 kB     
Downloading: 37 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 40 kB     
Downloading: 44 kB     
Downloading: 44 kB     
Downloading: 48 kB     
Downloading: 48 kB     
Downloading: 52 kB     
Downloading: 52 kB     
Downloading: 56 kB     
Downloading: 56 kB     
Downloading: 60 kB     
Downloading: 60 kB     
Downloading: 64 kB     
Downloading: 64 kB     
Downloading: 68 kB     
Downloading: 68 kB     
Downloading: 72 kB     
Downloading: 72 kB     
Downloading: 73 kB     
Downloading: 73 kB     
Downloading: 76 kB     
Downloading: 76 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 85 kB     
Downloading: 85 kB     
Downloading: 89 kB     
Downloading: 89 kB     
Downloading: 93 kB     
Downloading: 93 kB     
Downloading: 97 kB     
Downloading: 97 kB     
Downloading: 97 kB     
Downloading: 97 kB     
Downloading: 97 kB     
Downloading: 97 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 100 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 120 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 140 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 170 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 190 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 200 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 210 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 220 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 230 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 240 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 250 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 260 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 270 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 280 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 290 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 300 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 310 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 320 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 330 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 340 kB     
Downloading: 350 kB     
Downloading: 350 kB     
Downloading: 360 kB     
Downloading: 360 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 380 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 400 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 410 kB     
Downloading: 430 kB     
Downloading: 430 kB     
Downloading: 430 kB     
Downloading: 430 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 450 kB     
Downloading: 460 kB     
Downloading: 460 kB     
Downloading: 460 kB     
Downloading: 460 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB     
Downloading: 470 kB
csd.csd.geo <- get_census_geometry("CA16", regions=list(CSD=censuscode), 
                                   level = "CSD", geo_format = "sf")
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## 
## 
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB     
Downloading: 51 kB
tractTable <- diversity_index(censuscode)
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading vectors data from local cache.
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Reading geo data from local cache.
## Joining, by = "GeoUID"
pal <- colorQuantile(
  palette =  'Blues',
  domain = city_data$priceperroom,
  n = 10
)
pal2 <- colorQuantile(
  palette =  'Reds',
  domain = tractTable$Ei,
  n = 10)

map <- leaflet() %>% addProviderTiles("CartoDB.Positron") %>%
  addPolygons(
    data = csd.csd.geo,
    color = 'black',
    fill = F,
    weight = 0.7,
    opacity = 0.9
  ) %>% addPolygons(
    data = tractTable,
    color =  ~ pal2(Ei),
    fill = ~ pal2(Ei),
    weight = 0.4
  ) %>%
  #addCircleMarkers(
  #   data = city_data,
  #       radius = ~ sqrt(4 * rooms),
  #   lat = ~ latitude,
  #   fillColor = ~ pal(priceperroom),
  #   color = 'black',
  #   stroke = T,
  #   fillOpacity = 0.5,
  #  weight = 0.1,
  #   layerId = ~ id,
  #   lng = ~ longitude
# ) %>% 
# addLegend(pal = pal, position = 'topleft', values = city_data$priceperroom)%>% 
addLegend(pal = pal2, position = 'topleft', values = tractTable$Ei)
## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Reds is 9
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Reds is 9
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Reds is 9
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Reds is 9
## Returning the palette you asked for with that many colors
map
long.ct <- get_census("CA16", regions=list(CSD=censusCodeMuni), 
                      vectors = minority_vectors, level = "CT",
                      labels = "detailed", geo_format = "sf")
## Census data is currently stored temporarily.
## 
##  In order to speed up performance, reduce API quota usage, and reduce unnecessary network calls, please set up a persistent cache directory by setting options(cancensus.cache_path = '<path to cancensus cache directory>')
## 
##  You may add this option, together with your API key, to your .Rprofile.
## Querying CensusMapper API...
## 
Downloading: 3.6 kB     
Downloading: 3.6 kB     
Downloading: 7.7 kB     
Downloading: 7.7 kB     
Downloading: 12 kB     
Downloading: 12 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB     
Downloading: 20 kB
## Querying CensusMapper API...
## 
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 16 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 32 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 49 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 65 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 81 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 98 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 110 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 130 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 150 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 160 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB     
Downloading: 180 kB
names(long.ct)[14:27] <- c("Total","White","South Asian","Chinese","Black","Filipino",
                           "Latin American","Arab","SE Asian","West Asian","Korean",
                           "Japanese","Other","Multiple")

long.ct.tidy <- long.ct %>% 
  select(-White) %>% 
  tidyr::gather(Group, Count, `South Asian`:Multiple) %>% 
  mutate(Proportion = Count/Total)

#head(as.data.frame(long.ct.tidy))

ggplot(long.ct.tidy) + geom_sf(aes(fill = Proportion^(1/2), colour = Proportion^(1/2))) + 
  scale_fill_viridis_c(option = 3, guide = FALSE) + 
  scale_colour_viridis_c(option = 3, guide = FALSE) + 
  theme_void() + 
  coord_sf(datum = NA) +
  facet_wrap(~Group, ncol = 4)  +
  labs(caption = "Visible minority groups by square-root proportion of Census Tract population\n@dshkol | Data: Statistics Canada, Census 2016")

pal <- colorQuantile(
  palette =  'Blues',
  domain = city_data$priceperroom,
  n = 10
)

map <- leaflet() %>% addProviderTiles("CartoDB.Positron") %>%
  addPolygons(
    data = csd.csd.geo,
    color = 'black',
    fill = F,
    weight = 0.7,
    opacity = 0.9
  ) %>% addPolygons(
    data = csd.geo,
    color = 'grey',
    fill = F,
    weight = 0.4
  ) %>%
  addCircleMarkers(
    data = city_data,
    radius = ~ sqrt(4 * rooms),
    lat = ~ latitude,
    fillColor = ~ pal(priceperroom),
    color = 'black',
    stroke = T,
    fillOpacity = 0.5,
    weight = 0.1,
    layerId = ~ id,
    lng = ~ longitude
  ) %>% 
  addLegend(pal = pal, position = 'topleft', values = city_data$priceperroom)
## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Blues is 9
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Blues is 9
## Returning the palette you asked for with that many colors
map
#############aggregate airbnb into city tracts.
city_tr  <-  csd.geo[csd.geo$CSD_UID == censusCodeMuni,]
#city_tr$vacancy = (city_tr$Dwellings - city_tr$Households) / city_tr$Dwellings
#save(toronto_tr, vancouver_tr, file="cityTractsWithPopAndVacancy.RData")


rbnb_pts <- city_data 
coordinates(rbnb_pts) <- ~longitude+latitude
city_tracts <- as_Spatial(city_tr)
rbnb_pts@proj4string <-CRS("+proj=longlat +datum=WGS84")
city_tracts@proj4string <-CRS("+proj=longlat +datum=WGS84")
plot(city_tracts, border = "grey")
points(rbnb_pts, col = "red", cex = 0.2, pch = 16)

#class(city_tracts)
#class(rbnb_pts)

PTS <- as(rbnb_pts, "sf")
POLY <- as(city_tracts, "sf")
idata <- st_intersection(PTS, POLY)
## although coordinates are longitude/latitude, st_intersection assumes that they are planar
## Warning: attribute variables are assumed to be spatially constant
## throughout all geometries
#head(idata)
idata$distribPrice <- cut2(idata$priceperroom, g = 10)
intervals <- levels(unique(idata$distribPrice))

rbnbPerTract <- as.data.frame(idata %>%
                                #group_by(CSD_UID) %>%
                                count(GeoUID, sort = TRUE) %>%
                                select(GeoUID, n))[,1:2]

rbnbDistributionPerTract <- as.data.frame(idata %>%
                                            #group_by(CSD_UID) %>%
                                            count(GeoUID, distribPrice) %>%
                                            select(GeoUID, distribPrice, n))[,1:3]


tractDistrib <- dcast(rbnbDistributionPerTract, GeoUID ~ distribPrice)
## Using n as value column: use value.var to override.
tractDistrib[is.na(tractDistrib)] <- 0
tractDistrib <- tractDistrib[,c("GeoUID", intervals)]
colnames(tractDistrib)[2:11] <- paste0("G", 1:10)

lookupDistrib <-  data.frame('name' = paste0("G", 1:10), 'interval' = intervals)

listingCounts <-  as.data.frame(rbnbPerTract[,1:2])
city_tracts@data <- data.frame(city_tracts@data,
                                  listingCounts[match(city_tracts@data$GeoUID,
                                                      listingCounts$GeoUID),])
city_tracts@data <- data.frame(city_tracts@data,
                                  tractDistrib[match(city_tracts@data$GeoUID,
                                                     tractDistrib$GeoUID),])
city_tracts@data <- data.frame(city_tracts@data,
                                  tractTable[match(city_tracts@data$GeoUID,
                                                   tractTable$GeoUID),])
Mino <-  as.data.frame(cma.ct[,c("GeoUID", minorities)])

city_tracts@data <- data.frame(city_tracts@data,
                                  Mino[match(city_tracts@data$GeoUID,
                                             Mino$GeoUID),])

city_tracts@data$ListingPerCapita <-  city_tracts@data$n / city_tracts@data$Population
city_tracts@data <- city_tracts@data %>% 
  mutate_at(minorities, funs(Share =./ Population) )

#summary(city_tracts@data)
centroidsCity <-  gCentroid(city_tracts,byid=TRUE)
#plot(centroidsCity, add = T, pch = 16, cex = 0.6)

listMinoShares  <-  paste0(minorities, "_Share")

EstimatorAirbnbPresence <-  cbind(city_tracts@data[,c("GeoUID", "ListingPerCapita", "Ei", 
                                                       listMinoShares)],
                                coordinates(centroidsCity))

#head(EstimatorAirbnbPresence)

DistCityHall <- distm(EstimatorAirbnbPresence[,c('x','y')], 
                      cityhall, fun=distVincentyEllipsoid)
EstimatorAirbnbPresence <-  cbind(EstimatorAirbnbPresence, DistCityHall)
hist(EstimatorAirbnbPresence$DistCityHall)

#head(EstimatorAirbnbPresence)

ggplot(EstimatorAirbnbPresence, aes(x = DistCityHall, y = ListingPerCapita)) +
  geom_point() + geom_smooth() + scale_x_log10() + scale_y_log10() +
  geom_vline(xintercept = breakDist, col = "orange", cex = 1)
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning: Removed 55 rows containing non-finite values (stat_smooth).
## Warning: Removed 55 rows containing missing values (geom_point).

# mean value of listing per capita of tracts between 0 & 10 km: 
central <- EstimatorAirbnbPresence %>%
  filter(DistCityHall <= breakDist, !is.na(ListingPerCapita)) %>%
  select(ListingPerCapita, DistCityHall, Ei, listMinoShares)

# regression listing per capita of tracts above 10 km: 
peripheral <- EstimatorAirbnbPresence %>%
  filter(DistCityHall > breakDist, !is.na(ListingPerCapita)) %>%
  select(ListingPerCapita, DistCityHall, Ei, listMinoShares)
for (sample in c("all", "central", "peripheral")){
  if (sample == "all") df <-  EstimatorAirbnbPresence
  if (sample == "central") df <-  central
  if (sample == "peripheral") df  <-  peripheral
  
  f <- paste0("scale(log(ListingPerCapita)) ~ scale(log(DistCityHall)) + ",
             paste0("scale(",listMinoShares[-1], ")", collapse = " + "))
  model <- lm(formula(f), data = df)
  print(paste0("obs = ", dim(df)[1]))
  print(summary(model))
  
  coeffs <-  as.data.frame(summary(model)$coefficients)
  coeffs$label <- substr(rownames(coeffs), 7, 17)
  res  <-  data.frame(coeffs, lab[match(coeffs$label, lab$vector),])
  res[,c("label", "vector")] <- NULL
  assign(paste0("Results_", sample), res)
}
## [1] "obs = 572"
## 
## Call:
## lm(formula = formula(f), data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.57836 -0.49532 -0.01496  0.50824  2.31458 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              -0.04615    0.03493  -1.321 0.187008    
## scale(log(DistCityHall)) -0.06803    0.04695  -1.449 0.147932    
## scale(v_CA16_3960_Share) -0.27618    0.05015  -5.508 5.82e-08 ***
## scale(v_CA16_3963_Share) -0.15508    0.04646  -3.338 0.000906 ***
## scale(v_CA16_3966_Share) -0.20503    0.05508  -3.722 0.000220 ***
## scale(v_CA16_3969_Share) -0.25682    0.04081  -6.292 6.81e-10 ***
## scale(v_CA16_3972_Share) -0.16055    0.05481  -2.929 0.003556 ** 
## scale(v_CA16_3975_Share)  0.02231    0.03990   0.559 0.576284    
## scale(v_CA16_3978_Share)  0.10553    0.05917   1.784 0.075079 .  
## scale(v_CA16_3981_Share) -0.17017    0.05054  -3.367 0.000817 ***
## scale(v_CA16_3984_Share)  0.07030    0.04905   1.433 0.152407    
## scale(v_CA16_3987_Share)  0.17224    0.03906   4.409 1.27e-05 ***
## scale(v_CA16_3990_Share)  0.04040    0.04816   0.839 0.401908    
## scale(v_CA16_3993_Share)  0.10269    0.04417   2.325 0.020470 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7883 on 502 degrees of freedom
##   (56 observations deleted due to missingness)
## Multiple R-squared:  0.3932, Adjusted R-squared:  0.3775 
## F-statistic: 25.02 on 13 and 502 DF,  p-value: < 2.2e-16
## 
## [1] "obs = 129"
## 
## Call:
## lm(formula = formula(f), data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.49437 -0.47483  0.08667  0.42039  1.52203 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              -0.01220    0.06309  -0.193 0.847000    
## scale(log(DistCityHall))  0.26612    0.07872   3.380 0.000992 ***
## scale(v_CA16_3960_Share) -0.06791    0.07964  -0.853 0.395603    
## scale(v_CA16_3963_Share)  0.44595    0.07945   5.613 1.42e-07 ***
## scale(v_CA16_3966_Share) -0.28827    0.09331  -3.089 0.002521 ** 
## scale(v_CA16_3969_Share) -0.04498    0.08377  -0.537 0.592318    
## scale(v_CA16_3972_Share) -0.11881    0.09007  -1.319 0.189809    
## scale(v_CA16_3975_Share)  0.19086    0.07210   2.647 0.009270 ** 
## scale(v_CA16_3978_Share) -0.05635    0.09086  -0.620 0.536355    
## scale(v_CA16_3981_Share) -0.15375    0.07385  -2.082 0.039604 *  
## scale(v_CA16_3984_Share) -0.14064    0.07321  -1.921 0.057227 .  
## scale(v_CA16_3987_Share)  0.09434    0.06984   1.351 0.179418    
## scale(v_CA16_3990_Share)  0.22782    0.07653   2.977 0.003555 ** 
## scale(v_CA16_3993_Share)  0.04045    0.07889   0.513 0.609078    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7137 on 114 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.542,  Adjusted R-squared:  0.4897 
## F-statistic: 10.38 on 13 and 114 DF,  p-value: 3.748e-14
## 
## [1] "obs = 388"
## 
## Call:
## lm(formula = formula(f), data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.58511 -0.45024 -0.01079  0.45360  2.05590 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              -1.375e-15  3.468e-02   0.000 1.000000    
## scale(log(DistCityHall)) -5.058e-01  5.097e-02  -9.923  < 2e-16 ***
## scale(v_CA16_3960_Share) -1.474e-01  4.938e-02  -2.986 0.003016 ** 
## scale(v_CA16_3963_Share) -3.871e-02  4.451e-02  -0.870 0.385008    
## scale(v_CA16_3966_Share)  3.147e-03  5.554e-02   0.057 0.954841    
## scale(v_CA16_3969_Share) -1.982e-01  4.021e-02  -4.929 1.24e-06 ***
## scale(v_CA16_3972_Share) -2.886e-01  5.411e-02  -5.333 1.68e-07 ***
## scale(v_CA16_3975_Share) -1.927e-04  3.735e-02  -0.005 0.995887    
## scale(v_CA16_3978_Share) -1.442e-02  5.010e-02  -0.288 0.773702    
## scale(v_CA16_3981_Share) -1.848e-01  5.207e-02  -3.549 0.000437 ***
## scale(v_CA16_3984_Share)  1.205e-01  5.287e-02   2.280 0.023180 *  
## scale(v_CA16_3987_Share)  1.467e-01  4.015e-02   3.653 0.000296 ***
## scale(v_CA16_3990_Share) -1.306e-02  5.381e-02  -0.243 0.808356    
## scale(v_CA16_3993_Share)  1.256e-01  4.237e-02   2.964 0.003230 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6832 on 374 degrees of freedom
## Multiple R-squared:  0.549,  Adjusted R-squared:  0.5333 
## F-statistic: 35.02 on 13 and 374 DF,  p-value: < 2.2e-16
#str(Results_all)
reg_total  <-  cbind(Results_all,Results_central, Results_peripheral)
reg_total[,c("t.value", "Std..Error", "t.value.1", "Std..Error.1", "label.1.1", "t.value.2", "Std..Error.2", "label.1.2")] <- NULL
colnames(reg_total)  <-  c("est_all", "pval_all",  "minority",  "est_central", "pval_central", 
                        "est_peripheral", "pval_peripheral")
reg_total$variables  <-  rownames(reg_total)
reg_total$var  <-  ifelse(is.na(reg_total$minority), as.character(reg_total$variables), as.character(reg_total$minority))
pall <- ggplot(reg_total, aes(x = var)) + 
  geom_bar(aes(y = est_all, fill = ifelse(pval_all < 0.05, "pval < 0.05", "pval >= 0.05")), stat="identity") + 
  # scale_y_continuous(limits = c(-0.55, 0.55)) +
  coord_flip() + theme(legend.title=element_blank()) 
pcent <- ggplot(reg_total, aes(x = var)) + 
  geom_bar(aes(y = est_central, fill = ifelse(pval_central < 0.05, "pval < 0.05", "pval >= 0.05")), stat="identity") +  
  # scale_y_continuous(limits = c(-0.55, 0.55)) + 
  coord_flip() +   theme(legend.title=element_blank() ) 

pper <- ggplot(reg_total, aes(x = var)) + 
  geom_bar(aes(y = est_peripheral, fill = ifelse(pval_peripheral < 0.05, "pval < 0.05", "pval >= 0.05")), stat="identity") +
  #scale_y_continuous(limits = c(-0.55, 0.55)) + 
  coord_flip() +   theme(legend.title=element_blank()) 

grid.arrange(pall, pcent, pper)

EstimatorAirbnbPrice <- data.frame(idata, EstimatorAirbnbPresence[match(idata$GeoUID, 
                                                                        EstimatorAirbnbPresence$GeoUID),])
# head(EstimatorAirbnbPrice)
# hist(EstimatorAirbnbPrice$priceperroom)


EstimatorAirbnbPrice_all <- EstimatorAirbnbPrice %>%
  filter(!is.na(priceperroom), priceperroom > 0) 
# mean value of listing per capita of tracts between 0 & 10 km: 
central_P <- EstimatorAirbnbPrice_all %>%
  filter(DistCityHall <= breakDist) #%>%   select(ListingPerCapita, DistCityHall, Ei, listMinoShares)

peripheral_P <- EstimatorAirbnbPrice_all %>%
  filter(DistCityHall > breakDist) #%>%   select(ListingPerCapita, DistCityHall, Ei, listMinoShares)



for (sample in c("all", "central", "peripheral")){
  if (sample == "all") df <-  EstimatorAirbnbPrice_all
  if (sample == "central") df  <-  central_P
  if (sample == "peripheral") df  <-  peripheral_P
  
  f  <-  paste0("scale(priceperroom) ~ scale(log(DistCityHall)) + ",
             paste0("scale(",listMinoShares[-1], ")", collapse = " + "))
  model <- lm(formula(f), data = df)
  
  print(paste0("obs = ", dim(df)[1]))
  print(summary(model))
  
  coeffs  <-  as.data.frame(summary(model)$coefficients)
  coeffs$label <- substr(rownames(coeffs), 7, 17)
  res  <-  data.frame(coeffs, lab[match(coeffs$label, lab$vector),])
  res[,c("label", "vector")] <- NULL
  assign(paste0("Results_", sample, "Price"), res)
}
## [1] "obs = 6804"
## 
## Call:
## lm(formula = formula(f), data = df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.1719 -0.6074 -0.1775  0.3757 10.4938 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)               0.0001715  0.0116023   0.015  0.98821    
## scale(log(DistCityHall)) -0.0700329  0.0147916  -4.735 2.24e-06 ***
## scale(v_CA16_3960_Share) -0.0040501  0.0144759  -0.280  0.77965    
## scale(v_CA16_3963_Share) -0.0333501  0.0148742  -2.242  0.02498 *  
## scale(v_CA16_3966_Share) -0.0952697  0.0155276  -6.136 8.97e-10 ***
## scale(v_CA16_3969_Share) -0.1388939  0.0135952 -10.216  < 2e-16 ***
## scale(v_CA16_3972_Share) -0.0653657  0.0153048  -4.271 1.97e-05 ***
## scale(v_CA16_3975_Share)  0.2004058  0.0139660  14.350  < 2e-16 ***
## scale(v_CA16_3978_Share)  0.0208043  0.0150666   1.381  0.16738    
## scale(v_CA16_3981_Share) -0.0212479  0.0184134  -1.154  0.24857    
## scale(v_CA16_3984_Share) -0.0121957  0.0181560  -0.672  0.50179    
## scale(v_CA16_3987_Share) -0.0077983  0.0128619  -0.606  0.54433    
## scale(v_CA16_3990_Share) -0.0413930  0.0139754  -2.962  0.00307 ** 
## scale(v_CA16_3993_Share)  0.0883160  0.0134153   6.583 4.95e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.957 on 6789 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.086,  Adjusted R-squared:  0.08424 
## F-statistic: 49.13 on 13 and 6789 DF,  p-value: < 2.2e-16
## 
## [1] "obs = 1903"
## 
## Call:
## lm(formula = formula(f), data = df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.1633 -0.6043 -0.1694  0.3830  8.9383 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)               0.0002889  0.0218172   0.013   0.9894    
## scale(log(DistCityHall))  0.1532740  0.0267821   5.723 1.21e-08 ***
## scale(v_CA16_3960_Share) -0.0194645  0.0324980  -0.599   0.5493    
## scale(v_CA16_3963_Share)  0.1299477  0.0291080   4.464 8.51e-06 ***
## scale(v_CA16_3966_Share) -0.0548723  0.0290338  -1.890   0.0589 .  
## scale(v_CA16_3969_Share)  0.1323365  0.0315733   4.191 2.90e-05 ***
## scale(v_CA16_3972_Share) -0.1266276  0.0286055  -4.427 1.01e-05 ***
## scale(v_CA16_3975_Share)  0.2297991  0.0305528   7.521 8.33e-14 ***
## scale(v_CA16_3978_Share) -0.0496651  0.0330595  -1.502   0.1332    
## scale(v_CA16_3981_Share) -0.0321204  0.0303847  -1.057   0.2906    
## scale(v_CA16_3984_Share) -0.0199639  0.0265449  -0.752   0.4521    
## scale(v_CA16_3987_Share)  0.0210175  0.0236057   0.890   0.3734    
## scale(v_CA16_3990_Share)  0.0074506  0.0303174   0.246   0.8059    
## scale(v_CA16_3993_Share)  0.0301178  0.0289459   1.040   0.2982    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9515 on 1888 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.1009, Adjusted R-squared:  0.09472 
## F-statistic:  16.3 on 13 and 1888 DF,  p-value: < 2.2e-16
## 
## [1] "obs = 4901"
## 
## Call:
## lm(formula = formula(f), data = df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.0587 -0.5515 -0.1483  0.3433  9.5876 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)               1.233e-15  1.300e-02   0.000 1.000000    
## scale(log(DistCityHall)) -3.679e-01  1.776e-02 -20.712  < 2e-16 ***
## scale(v_CA16_3960_Share)  6.006e-02  1.764e-02   3.406 0.000666 ***
## scale(v_CA16_3963_Share) -3.237e-02  1.615e-02  -2.005 0.045063 *  
## scale(v_CA16_3966_Share) -5.543e-02  1.950e-02  -2.842 0.004496 ** 
## scale(v_CA16_3969_Share) -8.936e-02  1.590e-02  -5.621 2.01e-08 ***
## scale(v_CA16_3972_Share) -1.197e-01  1.807e-02  -6.626 3.83e-11 ***
## scale(v_CA16_3975_Share)  1.142e-01  1.557e-02   7.335 2.58e-13 ***
## scale(v_CA16_3978_Share) -8.000e-03  1.672e-02  -0.479 0.632273    
## scale(v_CA16_3981_Share)  3.352e-02  2.131e-02   1.573 0.115729    
## scale(v_CA16_3984_Share) -6.840e-04  2.110e-02  -0.032 0.974140    
## scale(v_CA16_3987_Share) -4.271e-02  1.458e-02  -2.930 0.003402 ** 
## scale(v_CA16_3990_Share) -4.077e-03  1.994e-02  -0.204 0.838005    
## scale(v_CA16_3993_Share)  6.171e-02  1.459e-02   4.230 2.38e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9101 on 4887 degrees of freedom
## Multiple R-squared:  0.174,  Adjusted R-squared:  0.1718 
## F-statistic: 79.17 on 13 and 4887 DF,  p-value: < 2.2e-16
reg_total2  <-  cbind(Results_allPrice,Results_centralPrice, Results_peripheralPrice)
reg_total2[,c("t.value", "Std..Error", "t.value.1", "Std..Error.1", "label.1.1", "t.value.2", "Std..Error.2", "label.1.2")] <- NULL
colnames(reg_total2) <-  c("est_all", "pval_all",  "minority",  "est_central", "pval_central", 
                         "est_peripheral", "pval_peripheral")
reg_total2$variables <-  rownames(reg_total2)
reg_total2$var  <-  ifelse(is.na(reg_total2$minority), as.character(reg_total2$variables), 
                        as.character(reg_total2$minority))
pall2 <- ggplot(reg_total2, aes(x = var)) + 
  geom_bar(aes(y = est_all, fill = ifelse(pval_all < 0.05, "pval < 0.05", "pval >= 0.05")), stat="identity") + 
  # scale_y_continuous(limits = c(-0.55, 0.55)) +
  coord_flip() + theme(legend.title=element_blank()) 
pcent2 <- ggplot(reg_total2, aes(x = var)) + 
  geom_bar(aes(y = est_central, fill = ifelse(pval_central < 0.05, "pval < 0.05", "pval >= 0.05")), stat="identity") +  
  # scale_y_continuous(limits = c(-0.55, 0.55)) + 
  coord_flip() + theme(legend.title=element_blank() ) 
pper2 <- ggplot(reg_total2, aes(x = var)) + 
  geom_bar(aes(y = est_peripheral, fill = ifelse(pval_peripheral < 0.05, "pval < 0.05", "pval >= 0.05")), stat="identity") +
  #scale_y_continuous(limits = c(-0.55, 0.55)) +
  coord_flip() + 
  theme(legend.title=element_blank()) 

grid.arrange(pall, pall2, 
             pcent, pcent2, 
             pper, pper2, 
             ncol = 2)

ReardonSegregationAirbnbPrice <- segIndex10(tabOfSpatialUnits = city_tracts@data, distributionColNames = paste0("G", 1:10))
EntropySegregationMinorities  <-  cma_seg[cma_seg$CSD_UID == censusCodeMuni,"H"]

ReardonSegregationAirbnbPrice
## [1] 0.2637335
EntropySegregationMinorities
## # A tibble: 1 x 1
##       H
##   <dbl>
## 1 0.180

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.